<?php
// $Id: index.php,v 1.25 2004/09/02 17:04:07 hthouzard Exp $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System  				                    //
// Copyright (c) 2000 XOOPS.org                         					//
// <http://www.xoops.org/>                             						//
// ------------------------------------------------------------------------ //
// This program is free software; you can redistribute it and/or modify     //
// it under the terms of the GNU General Public License as published by     //
// the Free Software Foundation; either version 2 of the License, or        //
// (at your option) any later version.                                      //
// 																			//
// You may not change or alter any portion of this comment or credits       //
// of supporting developers from this source code or any supporting         //
// source code which is considered copyrighted (c) material of the          //
// original comment or credit authors.                                      //
// 																			//
// This program is distributed in the hope that it will be useful,          //
// but WITHOUT ANY WARRANTY; without even the implied warranty of           //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
// GNU General Public License for more details.                             //
// 																			//
// You should have received a copy of the GNU General Public License        //
// along with this program; if not, write to the Free Software              //
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
// ------------------------------------------------------------------------ //
include_once '../../../include/cp_header.php';
require_once "../../../mainfile.php";
require_once'../xoops_version.php';
include_once XOOPS_ROOT_PATH."/modules/".$modversion['dirname']."/admin/functions.php";
xoops_cp_header();

if(!isset($_GET['currentID'])){
	$_GET['currentID'] = 0;
}
adminmenu($_GET['currentID']);//creates tabs in admin section



//############################################################

// **********************************************************************************************************************************************
// **** Main
// **********************************************************************************************************************************************
if(isset($_POST['op'])) {
 $op=$_POST['op'];
}else if(isset($_GET['op'])) {
  $op=$_GET['op'];
}else{
  $op='post';
}




switch ($op)//code for these functions located in /admin/functions.php
{
	case "post":
	storyForm('',$op);
	break;
	
	
	case "manageLocal"://DISPLAY CURRENT AND EXPIRED NEWS STORIES
	manageNews();
	break;
	
	case "editLocal"://EDIT CONTENT OF NEWS STORIES 
	storyForm($_GET['ID'],'editLocal');
	break;
	
	case "deleteStory":
	deleteStory($_GET['regionalOnly']);
	break;

	case "postRegional":
	storyForm('',$op);
	break;
	
	case "manageRegional":
	manageNews('regional');
	break; 

	case "editRegional"://EDIT CONTENT OF NEWS STORIES
	storyForm($_GET['ID'],'editRegional');
	break;
		
}

//############################################################


xoops_cp_footer();
?>